chore: remove unused ip+loginAt index from Sessions model#41332
chore: remove unused ip+loginAt index from Sessions model#41332rishie81311518 wants to merge 1 commit into
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
WalkthroughRemoves an obsolete commented-out MongoDB index definition and its TODO from ChangesSession index cleanup
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Signed the CLA. Updated the title to match conventions. This is an internal cleanup, so I don't believe a changeset is needed |
Proposed changes
Removes the commented-out
{ ip: 1, loginAt: -1 }index definition (and itsTODO) from
packages/models/src/models/Sessions.ts. This index's onlyconsumer,
findLastLoginByIp, was removed in #40849, so the index has beendead code since then. This PR completes the cleanup the original TODO asked
for.
Issue(s)
Fixes #41317
Steps to test or reproduce
yarn dev.removed index or
Sessions.ts.findLastLoginByIpor the{ ip: 1, loginAt: -1 }index — none found.Further comments
Checked #40849 (the PR that removed
findLastLoginByIp) — it did notinclude a migration for dropping this index, so this cleanup follows the
same and doesn't add one either.
Summary by CodeRabbit